/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 19182
 * Date: 2025-06-20
 * Time: 9:43
 */
public class Dog {
    public String name;
    public int age;
    public Dog(String name, int age){
        this();
        this.name = name;
        this.age = age;
    }
    public Dog(){
        this.name = "大黄";
        this.age = 15;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public void bark(){
        System.out.println("汪汪");
    }

}
